import request from './request.js'

const afterSales = {
  //通过手机号、车排号、订单号获取到店信息
  getArrivalInfo(data) {
    return request.post('/business/OrderArrive/GetOrderUserInfo', data)
  },

  //通过优惠券id获取车牌
  getCarNumberByCoupon(data) {
    return request.post('/client/Coupon/CouponCarNumById', data)
  },

  //通过vin获取车辆信息
  getCarInfoByVin(data) {
    return request.post('/business/OrderArrive/GetCarInfoByVin', data)
  },

  //通过图片获取车牌
  getCarNumber(data) {
    return request.post('/business/OrderArrive/CarNumDistinguish', data)
  },

  //到店单扫码核销
  addNewOrderToArrive(data) {
    return request.post('/business/OrderArrive/AddNewOrderToArrive', data)
  },

  //提交
  creatArrival(data) {
    return request.post('/business/OrderArrive/AddOrderArrive', data)
  },

  //车辆热门品牌
  getHotCarBrandList(data) {
    return request.post('/common/AllCar/GetHotCarBrandList', data)
  },

  //车辆系列
  getCarTypeLists(data) {
    return request.post('/common/AllCar/GetCarTypeLists', data)
  },

  //车辆排量
  getcarTypeDisplacementLists(data) {
    return request.post('/common/AllCar/GetcarTypeDisplacementLists', data)
  },

  //车辆
  getCarList(data) {
    return request.post('/common/AllCar/GetCarList', data)
  },

  //轮胎商品
  getTyresByCar(data) {
    return request.post('/business/OrderArrive/GetTyresByCar', data)
  },

  //轮胎规格列表
  getTyres(data) {
    return request.post('/business/OrderArrive/GetCarSize', data)
  },

  //保存车辆信息
  updateCarData(data) {
    return request.post('/business/OrderArrive/UpdateCarData', data)
  },

  //预检保存
  addVisualCheck(data) {
    return request.post('/business/CarDetection/AddYJ', data)
  },

  //预检数据
  visualCheckData(data) {
    return request.post('/business/CarDetection/GetYJData', data)
  },

  //预检报告
  visualCheckReport(data) {
    return request.post('/business/CarDetection/GetCarDetectionDetail', data)
  },

  //上检保存
  addDismantCheck(data) {
    return request.post('/business/CarDetection/AddSJ', data)
  },

  //上检结果
  getDismantCheck(data) {
    return request.post('/business/CarDetection/GetSJProject', data)
  },

  //预检、上检进度
  getProgress(data) {
    return request.post('/business/CarDetection/GetProgress', data)
  },

  //上检已做的手动添加检查项
  getManually(data) {
    return request.post('/business/CarDetection/GetOther', data)
  },

  //上检报告
  dismantCheckReport(data) {
    return request.post('/business/CarDetection/GetCarDetectionDetailSJ', data)
  },

  //预检 上检 签名
  addSignature(data) {
    return request.post('/business/CarDetection/AddSignature', data)
  },

  //预检 上检 签名二维码
  getSignQrcode(data) {
    return request.post('/business/CarDetection/GetDetectionQrcode', data)
  },

  //预检 上检 签名短信
  sendSMS(data) {
    return request.post('/business/CarDetection/AddSMS', data)
  },

  //查询客户签字状态
  getSignatureStatus(data) {
    return request.post('/business/CarDetection/GetNotSignature', data)
  },

  //添加施工异常
  addWorkExcption(data) {
    return request.post('/business/OrderArrive/AddWorkExcption', data)
  },

  //施工异常报告
  // getArriveOrderException(data) {
  //   return request.post('/business/OrderArrive/GetArriveOrderException', data)
  // },

  //施工异常报告
  getArriveOrderException(data) {
    return request.get(
      '/api/business/core/CarDetection/GetWorkExceptionList?OrderArriveId=' +
        data.arriveId +
        '&SelectAll=' +
        data.SelectAll
    )
  },

  //获取签名
  getSignInfo(data) {
    return request.get(
      '/business/CarDetection/GetSignInfo?OrderArriveId=' +
        data.arriveId +
        '&type=' +
        data.type
    )
  },

  //质检异常（已关联和未关联）
  getAbnormalList(data) {
    return request.get(
      '/business/CarDetection/GetWorkExceptionListGroupOrder?OrderArriveId=' +
        data.arriveId
    )
  },

  //可关联的维保订单
  getArrivalOrderList(data) {
    return request.get(
      '/business/OrderArrive/GetOrderArriveCreateOrderList?ArriveId=' +
        data.arriveId
    )
  },

  //关联订单
  relationOrderException(data) {
    return request.post('/business/OrderArrive/DoRelationOrderException', data)
  },

  //提交质检
  addQualityInspection(data) {
    return request.post('/business/CarDetection/AddQualityInspection', data)
  },

  //质检报告
  getQualityInspection(data) {
    return request.post('/business/CarDetection/GetQualityInspection', data)
  },

  //交车报告
  getDeliveryReport(data) {
    return request.post('/business/CarDetection/GetReport', data)
  },

  //到店单列表
  arrivalRecordList(data) {
    return request.post('/business/OrderArrive/GetOrderArrivePageList', data)
  },

  //我的派工-到店单列表
  arrivalRecordListOfMy(data) {
    return request.post(
      '/business/OrderArrive/GetTechnicianOrderArrivePageList',
      data
    )
  },

  //到店单详情
  arrivalRecordDetail(data) {
    return request.post('/business/OrderArrive/GetOrderDetail', data)
  },

  //到店单检查进度
  getDetectionState(data) {
    return request.post(
      '/business/CarDetection/GetDetectionState?Order_Arrive_Store_Id=' +
        data.Order_Arrive_Store_Id
    )
  },

  //修改客户姓名
  updateUserName(data) {
    return request.post('/business/OrderArrive/UpdateUserName', data)
  },

  //派工
  doDispatch(data) {
    return request.post('/business/OrderArrive/doDispatch', data)
  },

  //操作到店单
  changeOrderArriveStatus(data) {
    return request.post('/business/OrderArrive/ChangeOrderArriveStatus', data)
  },

  // 维保订单列表
  GetBusOrderList(data) {
    return request.post('/business/OrderMaintenance/GetBusOrderList', data)
  },
  // 维保订单详情
  GetBusOrderDetails(data) {
    return request.post('/business/OrderMaintenance/GetBusOrderDetails', data)
  },
  // 维保订单备货商品信息
  OrderStockUpInfomation(data) {
    return request.post(
      '/business/OrderMaintenance/OrderStockUpInfomation',
      data
    )
  },
  // 维保订单备货入库
  OrderStockUp(data) {
    return request.post('/business/OrderMaintenance/OrderStockUp', data)
  },
  // 获取施工人员列表
  GetWorkerPageList(data) {
    return request.post('/business/OrderArrive/GetWorkerPageList', data)
  },

  // 到店记录-新建订单 - 保存订单
  AddNewOrder(data) {
    return request.post('/business/OrderArrive/AddNewOrder', data)
  },

  // 到店记录-新建订单 - 根据商品匹配服务列表
  GetServiceFeeByGoods(data) {
    return request.post('/client/MaintenanceGoods/GetServiceFeeByGoods', data)
  },

  // 到店记录 - 订单详情
  GetQuotationDetail(data) {
    return request.post('/business/OrderArrive/GetQuotationDetail', data)
  },

  // 到店记录 - 获取订单列表
  GetArriveQuotationList(data) {
    return request.post('/business/OrderArrive/GetArriveQuotationList', data)
  },

  // 创建订单 - 获取商品
  GetMaintenanceTypeAndGoodsList(data) {
    return request.post(
      '/business/MaintenanceGoods/GetMaintenanceTypeAndGoodsList',
      data
    )
  },

  // 创建订单 - 替换商品
  GetAllMaintenanceGoodsByTypeId(data) {
    return request.post(
      '/business/MaintenanceGoods/GetAllMaintenanceGoodsByTypeId',
      data
    )
  },

  // 根据选中商品得到实际所需的商品请求对象
  GetSelectedMaintenanceGoods(data) {
    return request.post(
      '/business/MaintenanceGoods/GetSelectedMaintenanceGoods',
      data
    )
  },

  // 到店记录 - 提交订单
  PostQuotation(data) {
    return request.post('/business/OrderArrive/PostQuotation', data)
  },

  // 到店记录-提交订单 - 发送短信
  SendSureQuatationPhoneMsg(data) {
    return request.post('/business/OrderArrive/SendSureQuatationPhoneMsg', data)
  },

  // 到店记录-提交订单 - 确认签字
  QuatationSure(data) {
    return request.post('/business/OrderArrive/QuatationSure', data)
  },

  // 提交订单 - 我的优惠券列表
  GetCouponList(data) {
    return request.post('/client/Coupon/GetCouponEntityMylist', data)
  },

  // 用福利包id 和商品服务查询福利包详情
  getUsableCouponsByIdAndGoods(data) {
    return request.post('/business/Coupon/GetUsableCouponsByIdAndGoods', data)
  },

  // 用福利包id查询福利包详情
  getUsableCouponsById(data) {
    return request.post('/business/Coupon/GetUsableCouponsById', data)
  },

  // 福利包绑定车辆
  couponBindingCar(data) {
    return request.post('/common/CouponCommon/CouponBindingCar', data)
  },

  // 根据选择的优惠券得到优惠金额
  CheckCouponsByGoods(data) {
    return request.post('/client/Coupon/CheckCouponsByGoods', data)
  },

  // 删除订单
  DeleteQuotation(data) {
    return request.delete('/business/OrderArrive/DeleteQuotation', data)
  },

  // 获取订单状态是否确认 - 客户端扫码确认轮询检索
  GetOrderStatus(id) {
    return request.get(
      '/business/OrderMaintenance/GetOrderStatus?OrderId=' + id
    )
  },

  // ​获取施工异常项(根据预检上检分组)
  GetGroupWorkExceptionList(id) {
    return request.get(
      '/business/CarDetection/GetGroupWorkExceptionList?OrderArriveId=' + id
    )
  },

  // ​扫优惠码下单
  createQuotationByCoupon(data) {
    return request.post(
      '/business/OrderArrive/VerificationCreateQuotation',
      data
    )
  },

  // 获取核销优惠券列表
  GetCouponCheckOrderList(data) {
    return request.post('/business/Coupon/GetCouponCheckOrderList', data)
  },

  // 现金支付
  cashPayments(data) {
    return request.post('/business/OrderArrive/CashPayments', data)
  },
}

export default afterSales
